<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <title>{:SEO('question-list','title', array('C_TITLE' => $title))}</title>
  <meta name="keywords" content="{:SEO('question-list','keywords')}">
  <meta name="description" content="{:SEO('question-list','description')}">
  <link href="__ROOT__/{:C('YTATA_TPL_DIR')}/public/css/question.css" rel="stylesheet" type="text/css">
  <include file="public:header"/>
  <div class="question">
    <div class="lnav link_gray6">
      <div id="scrol">
        <div class="li <if condition=" $Think.get.cat eq '' ">select </if>">
        <div class="pic"><img src="__ROOT__/{:C('YTATA_IMG_CATEGORY_DIR')}0.png"/></div>
        <div class="cname"><a href="{:RU('question/lists')}">全部问题</a></div>
        <div class="clear"></div>
      </div>
      <ytata:cat listname="li" type="question" pid="0" />
      <volist name="li.list" id="li">
      <div class="li <if condition=" $Think.get.cat eq $li.c_id ">select </if>">
        <div class="pic"><img src="{$li.c_pic}"/></div>
        <div class="cname substring"><a href="{$li.qurl}">{$li.c_title}</a></div>
        <div class="clear"></div>
      </div>
      </volist>
  </div>
  
  </div>
  
  <div class="cmain">
    <div class="tit">
      <if condition="$Think.get.cat gt 0 ">
        <ytata:cat listname="list" id="$_GET['cat']" field="c_title,c_pic"/>
        <volist name="list.list" id="list">
          <div class="pic"><img src="{$list.c_pic}"/></div>
          <div class="cname substring">{$list.c_title}</div>
        </volist>
        <else/>
        <div class="pic"><img src="__ROOT__/{:C('YTATA_IMG_CATEGORY_DIR')}0.png"/></div>
        <div class="cname substring">全部问题</div>
      </if>
      
      <div class="clear"></div>
      <form action="{:RU('so/view')}" method="get" id="J_so_from">
        <div class="sobox">
          <div class="inputbox">
            <input type="text" class="so" name="key" placeholder="请输入关键词搜索问题">
            <input name="" type="submit" value="" class="btn">
          </div>
        </div>
        {:build_url_param('so/view')}
      </form>
      <script type="text/javascript">
          $("#J_so_from").submit(function () {
              key = $("#J_so_from input[name=key]").val();
              if (key == '') {
                  disapperTooltip("remind", "请填写关键字");
                  return false;
              } else {
                  return true;
              }
          });
      </script>
    </div>
    
    <if condition="$Think.get.cat gt 0 ">
      <div class="category link_gray6">
        <ytata:cat listname="li" pid="$_GET['cat']"/>
        <volist name="li.list" id="li">
        <div class="list <if condition=" $Think.get.cat1 eq $li.c_id ">select</if>">
        <a href="{$li.qurl}">{$li.c_title}</a></div>
        </volist>
        <div class="clear"></div>
      </div>
    </if>
  
  <div class="type link_gray6">
    <div class="li <if condition=" $Think.get.type eq '' ">select </if>">
      <a href="{:P(array('type'=>''))}">新问题</a>
    </div>
    <div class="li <if condition=" $Think.get.type eq '1' ">select </if>">
      <a href="{:P(array('type'=>'1'))}">零回答</a>
    </div>
    <div class="li <if condition=" $Think.get.type eq '2' ">select </if>">
      <a href="{:P(array('type'=>'2'))}">高悬赏</a>
    </div>
    <div class="li <if condition=" $Think.get.type eq '3' ">select </if>">
      <a href="{:P(array('type'=>'3'))}">已解决</a>
    </div>
    <div class="clear"></div>
  </div>
  
  <!-- 读取问题 -->
  <ytata:question listname="question" type="$_GET['type']" category1="$_GET['cat']" category2="$_GET['cat1']" page="1"/>
  <volist name="question.list" id="li">
    <div class="qlist">
      <if condition="$li.issolve eq '1' ">
        <div class="td1 type2"><span>{$li.answercount}</span><br>解决</div>
        <else/>
        <if condition="$li.answercount eq 0 ">
          <div class="td1 type0"><span>{$li.answercount}</span><br>回答</div>
          <elseif condition="$li.answercount gt 0"/>
          <div class="td1 type1"><span>{$li.answercount}</span><br>回答</div>
        </if>
      </if>
      <div class="td2"><span>{$li.click}</span><br>浏览</div>
      <div class="td3">
        <h4 class="link_gray3">
          <if condition="$li.reward gt 0 "><span class="reward">{$li.reward}</span></if>
          <a href="{$li.url}" target="_blank">
		  <empty name="li.title">
		  {$li.describe_cut}
		  <else /> 
			{$li.title}
			</empty> 
		  </a>
          <if condition="$li.qimg eq '1' "><span class="img">图</span></if>
        </h4>
        
        <div class="author link_gray3">
          <a class="tcat" href="{$li.cat.qurl}">{$li.cat.c_title}</a>
          <if condition="$li.answeruid gt 0 ">
            <a href="{$li.replyuser.user_url}" target="_blank">{$li.replyuser.nickname}</a> <span> 回复于 {$li.answertimestr}</span>
            <else/>
            <a href="{$li.adduser.user_url}" target="_blank">{$li.adduser.nickname}</a><span> 发布于 {$li.addtimestr}</span>
          </if>
        </div>
        <volist name="li.tags" id="tagsli">
          <a class="tag" href="{$tagsli.tagurl}" target="_blank">{$tagsli.tag}</a>
        </volist>
        <div class="clear"></div>
      </div>
      <div class="clear"></div>
    </div>
  </volist>
  <empty name="question.list">
    <div class="infoempty"> 暂时木有内容呀～～</div>
  </empty>

  <div class="uupage">{$question.page}</div>
  
  </div>
  
  <div class="rmain">
    <if condition="(C('YTATA_SMS_OPEN') eq '1') OR ($Think.session.ytata.uid Neq '')">
      <a class="btn" href="{:RU('question/add')}">我要提问</a>
    <else/>
      <a class="btn J_user_login" href="javascript:void(0);">我要提问</a>
    </if>
    
    <div class="tagbox">
      <div class="tit">热门标签</div>
      <div class="more link_gray6"><a href="{:RU('tag/lists')}">更多></a></div>
      <div class="clear"></div>
      <ytata:tag listname="tags" page="0" sort="hot" num="40"/>
      <volist name="tags.list" id="tli">
        <a class="tag" href="{$tli.url}">{$tli.tag}<span>({$tli.count_question})</span></a>
      </volist>
      <div class="clear"></div>
    </div>
    <include file="public:rankside" /> <!--排行-->
  </div>
  
  <!--排行Code-->
  
  <div class="clear"></div>
  </div>
  
  <include file="public:footer"/>
  </body>
</html>
